#include "domains/AxisAlignedDomain.hpp"

AxisAlignedDomain::AxisAlignedDomain(double _xmin, double _xmax, double _ymin, double _ymax) {
	xmin=_xmin;
	xmax=_xmax;
	ymin=_ymin;
	ymax=_ymax;
}

AxisAlignedDomain::~AxisAlignedDomain() {
}

bool AxisAlignedDomain::contains(Vector &p) {
	double x=p.x;
	double y=p.y;
	return x>=xmin && x<=xmax && y>=ymin && y<=ymax;
}

void AxisAlignedDomain::setBounds(double _xmin, double _xmax, double _ymin, double _ymax) {
	xmin=_xmin;
	xmax=_xmax;
	ymin=_ymin;
	ymax=_ymax;
}

double AxisAlignedDomain::get_axis1_min() { return xmin; }
double AxisAlignedDomain::get_axis1_max() { return xmax; }
double AxisAlignedDomain::get_axis2_min() { return ymin; }
double AxisAlignedDomain::get_axis2_max() { return ymax; }

